import java.util.*;

public class Student {
    private String name;
    private int classes;
    private double score;

    public Student(String name, int classes, double score) {
        this.name = name;
        this.classes = classes;
        this.score = score;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getClasses() {
        return classes;
    }

    public void setClasses(int classes) {
        this.classes = classes;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", classes=" + classes +
                ", score=" + score +
                '}';
    }

    public static String trimSameChar(String str1,String str2){
        StringBuilder sb=new StringBuilder();
        for (int i = 0; i < str1.length(); i++) {
            char ch1=str1.charAt(i);
            if (!str2.contains(ch1+"")) {
                sb.append(ch1);
            }
        }
        return sb.toString();
    }
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String str1=sc.nextLine();
        String str2=sc.nextLine();
        String ret= trimSameChar( str1, str2);
        System.out.println(ret);



    }
    public static void main2(String[] args) {
        ArrayList<Integer> integers=new ArrayList<>();
        integers.add(11);
        integers.add(1);
        integers.add(21);
       Collections.sort(integers);
        System.out.println(integers);
    }
    public static void main1(String[] args) {
        List<Student> ste=new ArrayList<>();
        ste.add(new Student("martin",108,58.5));
        ste.add(new Student("mar",107,68.5));
        ste.add(new Student("tin",106,98.5));
        ste.add(new Student("mart",108,55.5));
        System.out.println(ste);
    }
}
